-
Notifications
You must be signed in to change notification settings - Fork 736
add deprecation warnings for lxd and libvirt related commands #4024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4024 +/- ##
==========================================
- Coverage 89.50% 89.44% -0.07%
==========================================
Files 259 259
Lines 14740 14758 +18
==========================================
+ Hits 13193 13200 +7
- Misses 1547 1558 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8022cdc to
4208184
Compare
47088e4 to
c01203b
Compare
|
As far as I know, we will not be providing a programmatic way of migrating VMs through Multipass. It is possible that we a provide a guide for the user to still be able to access their VMs, but that still needs to be researched. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things that still need to be tweaked, mostly docs stuff.
A few other thoughts, though:
I would like to see the changes in the docs put into a separate PR. Several reasons for this:
- One, doc changes are instantaneous as in the user will see them right away, whereas code changes will only be visible in the next release (except for users on the edge channel).
- Two, I think it would be good to have some input from a technical author on how to format a consistent deprecation warning. I'm not sure a find and replace is the best approach.
- Three, there are still some code changes that need to happen and be reflected in the docs (i.e. CPU architecture support).
Moving the docs commits into another PR is good idea, will do.
Not sure about how feasible it is to actually get a technical author review, but we can definitely refine on the current approach. |
8d5f9c1 to
c01203b
Compare
|
We'll need to offer an alternative in ARM architectures and replace LXD as default. Until then, we'd be issuing deprecation warnings to people who have no other option (fine in edge). This means bringing QEMU in the snap for them too (hopefully only the right one for each architecture). Maybe better move it to vcpkg first? All that can go in separate PRs, but I think it's necessary to complete the deprecation. |
5d7809f to
d8eebff
Compare
|
@sharder996 @ricab docs related comments are addressed in the docs PR. The comments of this PR are also addressed, feel free to have a final scan and we can start merging soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Will be removed in a future PR so not too concerned about having it perfect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Jia, this is what we need. I have some minor suggestions inline.
include/multipass/constants.h
Outdated
| "After the removal, you will find the guide on how to access the {0} instances on \n" | ||
| "https://documentation.ubuntu.com/multipass/en/latest/\n\n"; // TODO lxd and libvirt migration, remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that we point to (future) documentation. However, maybe we could tune this to the driver and say:
- for libvirt: "Your instances will remain available with the QEMU driver"
- for LXD: "Your instances will no longer be available in Multipass then, but they will remain in LXD.
Then, when we actually remove the backend, we can say "... driver has been removed. Multipass is now using QEMU. ":
- for libvirt: "Your instances remain available."
- for LXD: "Your instances are still available in LXD. To access them, use
lxc --project=multipass ....lxc --helpfor more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that is better if we intend to let the user to access the lxd vm via lxd instead of offering a migration plan or guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @georgeliao, sorry I wasn't very clear. My idea was to actually come up with the appropriate message depending on which driver was selected, not print messages for both. Feel free to add different constants or derive the messages in some central part of the code if that is appropriate.
|
@ricab @sharder996 Maybe we can do another round of scan and finalize this? |
src/utils/utils.cpp
Outdated
| constexpr auto driver_deprecation_warning_template_common_part = | ||
| "**Warning! The {0} driver is deprecated and will be removed in an future " | ||
| "release.**\n\n"; | ||
| "***Warning! The {0} driver is deprecated and will be removed in an future " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still missing a space before/after the stars 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@georgeliao how about this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not notice that until you pointed out. Yes, the blueprint warning does have the space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ricab If there is no more comments. I think we can start to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still like to take this for a spin Jia, and I am afraid I have no time today. I'll try to do that on Monday.
| } | ||
|
|
||
| std::string deprecation_warning_message_driver_concatenated( | ||
| const QString driver_name); // TODO lxd and libvirt migration, remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no "migration" in this case, but we get the idea...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Jia, almost there. I'd request only minor tweaks to messages.
|
@ricab about the build, the Linux/Dispatch step is supposed to fail, right? |
This reverts commit 3dcdf72.
… to de-duplicate the code.
Co-authored-by: ScottH <59572507+sharder996@users.noreply.github.com> Signed-off-by: George Liao <georgeliaojia@gmail.com>
Co-authored-by: Ricardo Abreu <ricardo.abreu@canonical.com> Signed-off-by: George Liao <georgeliaojia@gmail.com>
Co-authored-by: Ricardo Abreu <ricardo.abreu@canonical.com> Signed-off-by: George Liao <georgeliaojia@gmail.com>
Co-authored-by: Ricardo Abreu <ricardo.abreu@canonical.com> Signed-off-by: George Liao <georgeliaojia@gmail.com>
2093e0d to
9c57114
Compare
MULTI-1887
MULTI-1892
First, about the warning message, I reused the message from hyperkit. It alludes the migration we want to provide. Are we certain that we will offer a migration plan? Otherwise we need to tune warning message a bit.
For functional testing, only the following operations should trigger the warning message
multipass set local.driver=lxd/libvirtmultipass list,multipass launch,multipass infowhen the current driver is lxd or libvirt